﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;

namespace Foundation
{
    public interface IRepository<T> where T : class
    {
        void Insert(T entity);
        void Delete(T entity);
        IQueryable<T> GetAll();
        T GetById(int id);


        /*
        #region Delete Methods
        long Delete(IEnumerable<T> objects);
        bool Delete(T oneObject);
        bool DeleteAll();
        bool DeleteById(object id);
        #endregion

        #region Retrieve Methods
        T GetById(object id);
        T GetSingle(Expression<Func<T, bool>> predicate);

        IEnumerable<T> Select();
        IEnumerable<T> Select(Expression<Func<T, bool>> predicate);
        #endregion

        #region Save Methods
        IEnumerable<T> Insert(IEnumerable<T> objects);
        bool Insert(T oneObject);

        IEnumerable<T> InsertOrUpdate(IEnumerable<T> objects);
        bool InsertOrUpdate(T oneObject);
        #endregion

        bool Exists(Expression<Func<T, bool>> predicate);
         */ 
    }
}
